import java.util.Random;


public class AddBlock extends Map implements Runnable{
	/**
	 *
	 */
	private static final long serialVersionUID = 1L;

	Map panel;

	AddBlock(Map m){
		panel = m;
	}

	AddBlock(){
		//
	}

	Random random = new Random();

	public void run(){
		addBlock(panel.map);
	}

	public void addBlock(int[][] map){
		for(int i = 0; i <= 7; i++){
			for(int j = 0; j <= 7; j++){
				if(map[j][i] == 7){
					int rand = random.nextInt(7);
					map[j][i] = rand;
					panel.stop(100);
				}
			}
		}
	}
}
